<template>
    <div>
        <h1>二级第二层</h1>
        <button @click="goRegister">跳转到注册</button>
    </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import {useRoute,useRouter} from 'vue-router';

export default defineComponent({
    setup () {
        
        const route = useRoute();
        console.log(route);
        console.log(route.params.id);
        const router = useRouter();
        // console.log(router);
        const goRegister = () =>{
            router.push({name:'register'})
        };
        
        
        
        return {
            goRegister,
        }
    }
})
</script>

<style scoped>

</style>